package adapter;

import android.support.annotation.Nullable;
import bean.DetailBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dispatchapp.andlei.R;

import java.util.List;

/**
 * @author Andlei
 * @DATE 2019/1/28
 */
public class CaptureAdapter extends BaseQuickAdapter<DetailBean,BaseViewHolder> {
    public CaptureAdapter(int layoutResId, @Nullable List<DetailBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, DetailBean item) {
        helper.setText(R.id.tv_id,helper.getAdapterPosition()+"");
        helper.setText(R.id.tv_code,"#"+item.getOrder_num());
        helper.setText(R.id.tv_address,item.getBuilding());
        helper.addOnClickListener(R.id.img_delete);
    }
}
